<template>
	<view style="margin-bottom: 100upx;">
		<view @click="handDetails(item.content)" class="cu-card article no-card" style="margin-bottom: 20upx;" v-for="(item,index) in newList" :key='item.id'>
			<view class="cu-item shadow">
				<view class="title">
					<view class="text-cut">{{item.newsTitle}}</view>
				</view>
				<view class="content">
					<image :src="item.newsImage" mode="aspectFill"></image>
					<view class="desc">
						<view class="text-content">{{item.newsDesc}}</view>
						<view>
							<view v-for="ele in item.yuSysDictList" :key='ele.id' class="cu-tag bg-yellow light sm round">{{ele.dataValue}}</view>
							<!-- <view class="cu-tag bg-green light sm round">史诗</view> -->
						</view>
					</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				page: 1,
				per_page: 10,
				newList:[]
			};
		},
		async mounted() {
			this.getMore()
		},
		methods: {
			handDetails(content){
				uni.navigateTo({
					url:'/pages/news/newsDetails/newsDetails?content='+content
				})
			},
			async getMore() {
				this.page = 1
				let page = this.page
				let per_page = this.per_page
				let res = await this.http.findYuNewsByPage({
					page: page,
					limit: per_page,
				})
				this.newList = res
				console.log(res,'ressss')
			}
		}
	}
</script>

<style lang="scss">
page{
	background-color: #f1f1f1 !important;
}
</style>
